package demo2;

public class Test {
    public static void func1(Animal animal) {
        animal.eat();
    }

    public static void testFly(IFly iFly) {
        iFly.fly();
    }

    public static void testRun(IRun iRun) {
        iRun.run();
    }

    public static void testSwim(ISwim iSwim) {
        iSwim.swim();
    }
   /* public  static  void  testIAmphibious(IAmphibious iAmphibious){
        iAmphibious.test1();
        iAmphibious.run();
        iAmphibious.swim();
    }*/

    public static void main(String[] args) {
        testRun(new Bird("百灵"));
        testSwim(new Dog("旺财"));
       /* testIAmphibious(new Frog("村霸"));
    }*/
    }
}
